// 后台路由
const express = require('express');
const router = express.Router();
//引入后台控制器
const apiAdminController = require('../controllers/apiAdminController');
// --------------------其他路由--------------------------------------


//超级管理员登录接口
router.post('/login', apiAdminController.login);

//代理登录接口
router.post('/agent/login', apiAdminController.login1);

// --------------------用户路由--------------------------------------


//====================网游棋牌=======================
router.get('/getAgents', apiAdminController.getAgents);

//查询一个代理  /users/1
router.get('/player/:uid', apiAdminController.getPlayerInfo);
//查询一个代理  /users/1
router.get('/agent/:tel', apiAdminController.getOneAgent);

//给代理充值房卡
router.get('/agent/addRoomCard', apiAdminController.getOneAgent);

router.post('/addAgent', apiAdminController.addAgent);

//修改代理信息接口
router.post('/editAgent', apiAdminController.updateAgent);

//给玩家充卡接口
router.post('/addRoomCardForAgent', apiAdminController.addRoomCardForAgent);
//给玩家充卡接口
router.post('/addRoomCard', apiAdminController.addRoomCardForPlayer);

router.get('/record/:agentId', apiAdminController.getRecordById);

router.get('/agentRecord/:managerId', apiAdminController.getRecordByManagerId);

router.post('/hallInfo', apiAdminController.getGameHallInfo);

router.post('/modifyhallInfo', apiAdminController.UpdateGameHallInfo);

router.post('/getFeedBacks', apiAdminController.getFeedBackInfo);

router.post('/modifyHouse', apiAdminController.changeTeaHouse);

//====================网游棋牌=======================


module.exports = router;